﻿using GalaSoft.MvvmLight.Command;
using MuddyBoots.GreenlightQC.DataService;
using MuddyBoots.GreenlightQC.DataService.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace MuddyBoots.GreenlightQC.Mobile.UI.ViewModel
{
    public partial class MainWindowViewModel
    {
		private IEnumerable<MenuItem> subMenu;

        private ViewModel currentViewModel;

        public bool IsLoggedIn
        {
            get
            {
                return this.menu != null;
            }

            set
            {
                this.RaisePropertyChanged("IsLoggedIn");
            }
        }

		public IEnumerable<MenuItem> SubMenu
        {
            get
            {
                return this.subMenu;
            }

			set
            {
                this.subMenu = value;
                this.RaisePropertyChanged("SubMenu");
            }
        }

        public ViewModel CurrentViewModel
        {
            get
            {
                return this.currentViewModel;
            }

            set
            {
                if (value != this.currentViewModel)
                {
                    this.currentViewModel = value;
                    this.RaisePropertyChanged("CurrentViewModel");
                }
            }
        }

        public ICommand LoadAssessmentCommand
        {
            get
            {
                return new RelayCommand(this.LoadAssessmentExecute);
            }
        }

		public ICommand ShowAssessmentsCommand
        {
            get
            {
                return new RelayCommand(this.ShowAssessmentsExecute);
            }
        }

		public ICommand ShowCorrectiveActionsCommand
        {
			get
            {
                return new RelayCommand(this.ShowCorrectiveActionsExecute);
            }
        }

		public ICommand ShowTasksCommand
        {
            get
            {
                return new RelayCommand(this.ShowTasksExecute);
            }
        }

        public ICommand ShowSyncroniseCommand
        {
            get
            {
                return new RelayCommand(this.ShowSynchroniseExecute);
            }
        }

		public ICommand ShowReportsCommand
        {
			get
            {
                return new RelayCommand(this.ShowReportsExecute);
            }
        }
    }
}
